﻿using System;
using Common.Views;
using Core.Domain.Model;
using NUnit.Framework;
using Sanelib.Common.Helpers;
using Sanelib.DataView;

namespace IntegrationTests.ViewModel
{
    public class TrackLogViewRepositoryTester : IntegrationTestBase
    {
        [Test]
        public void ShouldAddTrackLog()
        {
            var log = new TrackLog
            {
                Id = GuidComb.New(),
                Code = "Admin",
                DetectedOn = DateTime.Now,
                Name = "Admin"
            };

            Persist(log);

            var repo = GetInstance<IViewRepository<TrackLogView>>();
            Assert.IsNotNull(repo.GetById(log.Id));
        }
    }
}